/*
 * Copyright (c) 2024 vitasystems GmbH
 *
 * This file is part of project EHRbase Migration Tool
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.ehrbase.migration.importer.v4.jooq.pg.tables.records;

import java.time.OffsetDateTime;
import java.util.UUID;
import org.ehrbase.migration.importer.v4.jooq.pg.tables.EhrStatusVersion;
import org.jooq.Field;
import org.jooq.Record1;
import org.jooq.Record6;
import org.jooq.Row6;
import org.jooq.impl.UpdatableRecordImpl;

/**
 * This class is generated by jOOQ.
 */
@SuppressWarnings({"all", "unchecked", "rawtypes", "this-escape"})
public class EhrStatusVersionRecord extends UpdatableRecordImpl<EhrStatusVersionRecord>
        implements Record6<UUID, UUID, UUID, UUID, Integer, OffsetDateTime> {

    private static final long serialVersionUID = 1L;

    /**
     * Setter for <code>ehr.ehr_status_version.vo_id</code>.
     */
    public void setVoId(UUID value) {
        set(0, value);
    }

    /**
     * Getter for <code>ehr.ehr_status_version.vo_id</code>.
     */
    public UUID getVoId() {
        return (UUID) get(0);
    }

    /**
     * Setter for <code>ehr.ehr_status_version.ehr_id</code>.
     */
    public void setEhrId(UUID value) {
        set(1, value);
    }

    /**
     * Getter for <code>ehr.ehr_status_version.ehr_id</code>.
     */
    public UUID getEhrId() {
        return (UUID) get(1);
    }

    /**
     * Setter for <code>ehr.ehr_status_version.contribution_id</code>.
     */
    public void setContributionId(UUID value) {
        set(2, value);
    }

    /**
     * Getter for <code>ehr.ehr_status_version.contribution_id</code>.
     */
    public UUID getContributionId() {
        return (UUID) get(2);
    }

    /**
     * Setter for <code>ehr.ehr_status_version.audit_id</code>.
     */
    public void setAuditId(UUID value) {
        set(3, value);
    }

    /**
     * Getter for <code>ehr.ehr_status_version.audit_id</code>.
     */
    public UUID getAuditId() {
        return (UUID) get(3);
    }

    /**
     * Setter for <code>ehr.ehr_status_version.sys_version</code>.
     */
    public void setSysVersion(Integer value) {
        set(4, value);
    }

    /**
     * Getter for <code>ehr.ehr_status_version.sys_version</code>.
     */
    public Integer getSysVersion() {
        return (Integer) get(4);
    }

    /**
     * Setter for <code>ehr.ehr_status_version.sys_period_lower</code>.
     */
    public void setSysPeriodLower(OffsetDateTime value) {
        set(5, value);
    }

    /**
     * Getter for <code>ehr.ehr_status_version.sys_period_lower</code>.
     */
    public OffsetDateTime getSysPeriodLower() {
        return (OffsetDateTime) get(5);
    }

    // -------------------------------------------------------------------------
    // Primary key information
    // -------------------------------------------------------------------------

    @Override
    public Record1<UUID> key() {
        return (Record1) super.key();
    }

    // -------------------------------------------------------------------------
    // Record6 type implementation
    // -------------------------------------------------------------------------

    @Override
    public Row6<UUID, UUID, UUID, UUID, Integer, OffsetDateTime> fieldsRow() {
        return (Row6) super.fieldsRow();
    }

    @Override
    public Row6<UUID, UUID, UUID, UUID, Integer, OffsetDateTime> valuesRow() {
        return (Row6) super.valuesRow();
    }

    @Override
    public Field<UUID> field1() {
        return EhrStatusVersion.EHR_STATUS_VERSION.VO_ID;
    }

    @Override
    public Field<UUID> field2() {
        return EhrStatusVersion.EHR_STATUS_VERSION.EHR_ID;
    }

    @Override
    public Field<UUID> field3() {
        return EhrStatusVersion.EHR_STATUS_VERSION.CONTRIBUTION_ID;
    }

    @Override
    public Field<UUID> field4() {
        return EhrStatusVersion.EHR_STATUS_VERSION.AUDIT_ID;
    }

    @Override
    public Field<Integer> field5() {
        return EhrStatusVersion.EHR_STATUS_VERSION.SYS_VERSION;
    }

    @Override
    public Field<OffsetDateTime> field6() {
        return EhrStatusVersion.EHR_STATUS_VERSION.SYS_PERIOD_LOWER;
    }

    @Override
    public UUID component1() {
        return getVoId();
    }

    @Override
    public UUID component2() {
        return getEhrId();
    }

    @Override
    public UUID component3() {
        return getContributionId();
    }

    @Override
    public UUID component4() {
        return getAuditId();
    }

    @Override
    public Integer component5() {
        return getSysVersion();
    }

    @Override
    public OffsetDateTime component6() {
        return getSysPeriodLower();
    }

    @Override
    public UUID value1() {
        return getVoId();
    }

    @Override
    public UUID value2() {
        return getEhrId();
    }

    @Override
    public UUID value3() {
        return getContributionId();
    }

    @Override
    public UUID value4() {
        return getAuditId();
    }

    @Override
    public Integer value5() {
        return getSysVersion();
    }

    @Override
    public OffsetDateTime value6() {
        return getSysPeriodLower();
    }

    @Override
    public EhrStatusVersionRecord value1(UUID value) {
        setVoId(value);
        return this;
    }

    @Override
    public EhrStatusVersionRecord value2(UUID value) {
        setEhrId(value);
        return this;
    }

    @Override
    public EhrStatusVersionRecord value3(UUID value) {
        setContributionId(value);
        return this;
    }

    @Override
    public EhrStatusVersionRecord value4(UUID value) {
        setAuditId(value);
        return this;
    }

    @Override
    public EhrStatusVersionRecord value5(Integer value) {
        setSysVersion(value);
        return this;
    }

    @Override
    public EhrStatusVersionRecord value6(OffsetDateTime value) {
        setSysPeriodLower(value);
        return this;
    }

    @Override
    public EhrStatusVersionRecord values(
            UUID value1, UUID value2, UUID value3, UUID value4, Integer value5, OffsetDateTime value6) {
        value1(value1);
        value2(value2);
        value3(value3);
        value4(value4);
        value5(value5);
        value6(value6);
        return this;
    }

    // -------------------------------------------------------------------------
    // Constructors
    // -------------------------------------------------------------------------

    /**
     * Create a detached EhrStatusVersionRecord
     */
    public EhrStatusVersionRecord() {
        super(EhrStatusVersion.EHR_STATUS_VERSION);
    }

    /**
     * Create a detached, initialised EhrStatusVersionRecord
     */
    public EhrStatusVersionRecord(
            UUID voId,
            UUID ehrId,
            UUID contributionId,
            UUID auditId,
            Integer sysVersion,
            OffsetDateTime sysPeriodLower) {
        super(EhrStatusVersion.EHR_STATUS_VERSION);

        setVoId(voId);
        setEhrId(ehrId);
        setContributionId(contributionId);
        setAuditId(auditId);
        setSysVersion(sysVersion);
        setSysPeriodLower(sysPeriodLower);
        resetChangedOnNotNull();
    }
}
